Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

core/prefs/src/commonMain/kotlin/org/meshtastic/core/prefs/meshlog/MeshLogPrefsImpl.kt bc5cf83df7fd6b405ffc521d7c3ed4e1f3e8271a (bc5cf83d) Text, 2.86 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.prefs.meshlog

Tff7b72import T7ee787androidx.datastore.core.DataStore
Tff7b72import T7ee787androidx.datastore.preferences.core.Preferences
Tff7b72import T7ee787androidx.datastore.preferences.core.booleanPreferencesKey
Tff7b72import T7ee787androidx.datastore.preferences.core.edit
Tff7b72import T7ee787androidx.datastore.preferences.core.intPreferencesKey
Tff7b72import T7ee787kotlinx.coroutines.CoroutineScope
Tff7b72import T7ee787kotlinx.coroutines.SupervisorJob
Tff7b72import T7ee787kotlinx.coroutines.flow.SharingStarted
Tff7b72import T7ee787kotlinx.coroutines.flow.StateFlow
Tff7b72import T7ee787kotlinx.coroutines.flow.map
Tff7b72import T7ee787kotlinx.coroutines.flow.stateIn
Tff7b72import T7ee787kotlinx.coroutines.launch
Tff7b72import T7ee787org.koin.core.annotation.Named
Tff7b72import T7ee787org.koin.core.annotation.Single
Tff7b72import T7ee787org.meshtastic.core.di.CoroutineDispatchers
Tff7b72import T7ee787org.meshtastic.core.repository.MeshLogPrefs

Tf0883e@Single
Tff7b72class T56d364MeshLogPrefsImplTb4b4b4(
Tf0883e@NamedTb4b4b4(Ta5d6ff"Ta5d6ffMeshLogDataStoreTa5d6ff"Tb4b4b4) Tff7b72private Tff7b72val Te6edf3dataStoreTb4b4b4: Te6edf3DataStoreTff7b72<Te6edf3PreferencesTff7b72>Tb4b4b4,
Te6edf3dispatchersTb4b4b4: Te6edf3CoroutineDispatchersTb4b4b4,
Tb4b4b4) Tb4b4b4: Te6edf3MeshLogPrefs Tb4b4b4{
Tff7b72private Tff7b72val Te6edf3scope Tff7b72= Te6edf3CoroutineScopeTb4b4b4(Te6edf3SupervisorJobTb4b4b4(Tb4b4b4) Tff7b72+ Te6edf3dispatchersTb4b4b4.Te6edf3defaultTb4b4b4)

Tff7b72override Tff7b72val Te6edf3retentionDaysTb4b4b4: Te6edf3StateFlowTff7b72<Tffa657IntTff7b72> Tff7b72=
Te6edf3dataStoreTb4b4b4.Te6edf3data
Tb4b4b4.Te6edf3map Tb4b4b4{ Tffa657itTff7b72[Te6edf3KEY_RETENTION_DAYS_PREFTff7b72] Tff7b72?: Te6edf3DEFAULT_RETENTION_DAYS Tb4b4b4}
Tb4b4b4.Te6edf3stateInTb4b4b4(Te6edf3scopeTb4b4b4, Te6edf3SharingStartedTb4b4b4.Te6edf3EagerlyTb4b4b4, Te6edf3DEFAULT_RETENTION_DAYSTb4b4b4)

Tff7b72override Tff7b72fun Td2a8ffsetRetentionDaysTb4b4b4(Te6edf3daysTb4b4b4: Tffa657IntTb4b4b4) Tb4b4b4{
Te6edf3scopeTb4b4b4.Te6edf3launch Tb4b4b4{ Te6edf3dataStoreTb4b4b4.Te6edf3edit Tb4b4b4{ Tffa657itTff7b72[Te6edf3KEY_RETENTION_DAYS_PREFTff7b72] Tff7b72= Te6edf3days Tb4b4b4} Tb4b4b4}
Tb4b4b4}

Tff7b72override Tff7b72val Te6edf3loggingEnabledTb4b4b4: Te6edf3StateFlowTff7b72<Tffa657BooleanTff7b72> Tff7b72=
Te6edf3dataStoreTb4b4b4.Te6edf3data
Tb4b4b4.Te6edf3map Tb4b4b4{ Tffa657itTff7b72[Te6edf3KEY_LOGGING_ENABLED_PREFTff7b72] Tff7b72?: Te6edf3DEFAULT_LOGGING_ENABLED Tb4b4b4}
Tb4b4b4.Te6edf3stateInTb4b4b4(Te6edf3scopeTb4b4b4, Te6edf3SharingStartedTb4b4b4.Te6edf3EagerlyTb4b4b4, Te6edf3DEFAULT_LOGGING_ENABLEDTb4b4b4)

Tff7b72override Tff7b72fun Td2a8ffsetLoggingEnabledTb4b4b4(Te6edf3enabledTb4b4b4: Tffa657BooleanTb4b4b4) Tb4b4b4{
Te6edf3scopeTb4b4b4.Te6edf3launch Tb4b4b4{ Te6edf3dataStoreTb4b4b4.Te6edf3edit Tb4b4b4{ Tffa657itTff7b72[Te6edf3KEY_LOGGING_ENABLED_PREFTff7b72] Tff7b72= Te6edf3enabled Tb4b4b4} Tb4b4b4}
Tb4b4b4}

Tff7b72companion Tff7b72object Tb4b4b4{
Tff7b72const Tff7b72val Te6edf3RETENTION_DAYS_KEY Tff7b72= Ta5d6ff"Ta5d6ffmeshlog_retention_daysTa5d6ff"
Tff7b72const Tff7b72val Te6edf3LOGGING_ENABLED_KEY Tff7b72= Ta5d6ff"Ta5d6ffmeshlog_logging_enabledTa5d6ff"
Tff7b72const Tff7b72val Te6edf3DEFAULT_RETENTION_DAYS Tff7b72= T79c0ff3T79c0ff0
Tff7b72const Tff7b72val Te6edf3DEFAULT_LOGGING_ENABLED Tff7b72= Tff7b72true

Tff7b72val Te6edf3KEY_RETENTION_DAYS_PREF Tff7b72= Te6edf3intPreferencesKeyTb4b4b4(Te6edf3RETENTION_DAYS_KEYTb4b4b4)
Tff7b72val Te6edf3KEY_LOGGING_ENABLED_PREF Tff7b72= Te6edf3booleanPreferencesKeyTb4b4b4(Te6edf3LOGGING_ENABLED_KEYTb4b4b4)
Tb4b4b4}
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.05s